mapping, possibly reordered to match the order
of set.
order
The order used for rearranging the mapping.
Arguments
x
An object to be transformed into a set.
mapping
A list, array or data frame representing a mapping of the set.
margin
Margins to be reordered (ignored if mapping is a
list). If NULL, all margins with the same length of x
will be used.
Details
This helper function can be used when a set is to be created from some
object x, and another object contains some meta-information
on the set elements in the same order than the elements
of x. The set creation can cause the input elements to be
permuted. By the use of this function, the meta information can be kept in
sync with the result of iterating over the associated set.